# -*- coding: utf-8 -*- 
# @project : 《Atcoder》
# @Author : created by bensonrachel on 2021/8/9
# @File : （step4）C. Pair Selection（CF）.py
# https://codeforces.com/edu/course/2/lesson/6/4/practice/contest/285069/problem/C

"""
Given n pairs of positive integers (a1,b1),(a2,b2),…,(an,bn). Select k (1≤k≤n) of them i1,i2,…,ik
so that the ratio ai1+ai2+⋯+aik/bi1+bi2+⋯+bik is maximum possible.

"""
def check(mid):
    pre = []
    for i in range(n):
        pre.append(char[i][0] - mid * char[i][1])
    pre.sort(reverse=True)
    tmp = sum(pre[0:k])
    if (tmp >= 0):
        return True
    return False


def bi():
    l = -1
    r = 1000000
    for _ in range(100):
        mid = (l + r) / 2
        if (check(mid)):
            l = mid
        else:
            r = mid
    return l


if __name__ == "__main__":
    """
        最大化平均值   C. Pair Selection
        0，二分平均数，找最大肯定是左二分。
        1，推导公式(移项）
        2，转化问题
        3，排序，因为只要找到比0大的，存在就行 ， 所以就尽可能找最大的K个。
    """
    n, k = map(int, input().split())
    char = []
    for _ in range(n):
        a, b = map(int, input().split())
        char.append((a, b))
    print(bi())


